package model;

/**
 * Piece.java
 * Purpose: presents a piece on the game board
 * 
 * @author Hans Brems
 * @version 1.0 01/12/2011
 */

import java.awt.Graphics2D;

public abstract class Piece {
	/* Default height of all pieces */
	public static int height = 50;
	/* Default width of all pieces */
	public static int width = 50;
	/* The position of the piece on the screen */
	protected Vector position;
	/* Should images be rendered */
	protected static boolean renderImages = true;
	
	/** Sets the rendering of images */
	public static void setRenderImages(boolean renderImages) {
		Piece.renderImages = renderImages;
	}

	/** Returns the position of the piece on the screen */
	public Vector getPosition() {
		return this.position;
	}
	
	/** Sets the position of the piece on the screen */
	public void setPosition(Vector position) {
		this.position = position;
	}
	
	/** Updates the piece */
	public abstract void update(double delta);
	
	/** Draws the piece */
	public abstract void draw(Graphics2D g);
}